1. Field of the Invention
The present invention relates to a method of analyzing disk drive failure wherein a disk drive target controller is connected to an initiator on a SCSI bus, including storing SCSI bus state information upon receipt of a SCSI bus reset condition.
2. Description of the Prior Art
In the disk drive industry, the small computer system interface (SCSI) is an industry standard which uses a bus protocol and hardware interface to allow multiple devices to communication across the same bus. In one example, from 2-16 devices can be connected to the SCSI bus. A SCSI device can either be an initiator or a target. For example, a host initiator sends commands, and a disk drive target controller responds. Although most any combination of initiators and targets can be connected to the SCSI bus, only one initiator and one target can be communicating on the SCSI bus at a given moment.
The SCSI bus is designed to operate within multiple logical phases. The SCSI bus can only be in one phase at any given time. Transitions between logical phases is accomplished in a pre-defined manner. Examples of the phases of the SCSI bus are BUS-FREE, ARBITRATION, SELECTION, RESELECTION, COMMAND, DATA IN, DATA OUT, STATUS, MESSAGE IN AND MESSAGE OUT. The BUS-FREE phase occurs when none of the devices are active on the SCSI bus. The ARBITRATION phase is used wherein multiple devices are attempting to get on the SCSI bus. Each device has a distinctive SCSI ID wherein the device having the highest SCSI ID (i.e., having the predetermined highest priority) is allowed to get on the bus. The SELECTION phase allows a host initiator to connect to a disk drive target, and the RESELECTION phase allows the target to reconnect to the initiator. By doing so, the target can continue an operation previously started by the initiator, but suspended by the drive. The command, data, status and message logical phases are called the information transfer phases.
Bus transactions allowing the exchange of information take place on the SCSI bus using a defined request/acknowledge (REQ/ACK) hand-shake protocol. Transfers across the SCSI bus can be synchronous or asynchronous. In asynchronous data transfer, there is an interlocked request and acknowledge control line hand-shake for each unit of data to ensure that the data are sent accurately. Non-data transfers (e.g., commands, status responses, etc.) use asynchronous mode.
Synchronous data transfer allows data to be transferred at a faster rate than asynchronous data transfer. In a synchronous data transfer, data is sent at a preset or negotiated data rate, such as 5 mega-transfers per second. In particular, a negotiated SCSI period and a negotiated SCSI offset is determined between the initiator and the target. The negotiated SCSI period is defined as the negotiated rate at which requests and acknowledgments are sent (e.g., 5 mega-transfers/sec). The negotiated or "maximum" SCSI offset is defined as the maximum number of requests outstanding before the target will stop and wait for an acknowledgment to occur.
The SCSI controller keeps track of information relevant to its present communication status. For example, the SCSI controller may track the SCSI ID of the initiator device which it is actively communicating with via the SCSI bus, a SCSI offset counter (which counts the number of SCSI requests which have not been acknowledged), the negotiated SCSI period, the negotiated SCSI offset, and the SCSI bus phase. When the target disk drive controller is active on the SCSI bus, this information is utilized for communicating with the initiator.
A reset condition detected on the SCSI bus aborts any active phase. A reset is always followed by the bus free phase. A reset condition may be caused by a communication error associated with the initiator, the disk drive target, or less typically, a device which is connected to the SCSI bus but which is not active on the SCSI bus.
In one example, a reset condition may occur during a synchronous data transfer wherein the SCSI offset counter exceeds the negotiated SCSI offset. In another example regarding a 512 byte transfer, the initiator will expect to see 512 request pulses occur. In particular, the disk drive target may have generated 512 request pulses, but the initiator only counted 511, so the initiator only responds with 511 acknowledges. The disk drive target is expecting 512 acknowledges, since each request must be paired with an acknowledge. Therefore, the host initiator will wait a predetermined time delay to receive the last request. After the time delay, the host initiator will generate a reset.
A reset condition generated on the SCSI bus will reset all devices, both active an inactive, connected to the SCSI bus. The reset operates to clear registers containing SCSI bus state or status information associated with each device at the time of the reset, or operates to return the information contained within these registers to a default state. It is difficult to later determine the cause of the reset condition, since the SCSI bus state information at the time of the reset is no longer available.
Further, multiple devices are connected to the common SCSI bus. Although only one initiator and one disk drive target are active on the SCSI bus at any given moment, the reset condition operates to clear the registers of devices which are not active on the SCSI bus but connected to the SCSI bus at the time of the reset. Since the state registers of both active and inactive devices have been cleared or reset to a default state, it is difficult to determine which device was active on the SCSI bus at the time of the reset, and therefore, may have caused the reset to occur.